The Spanning Tree Protocol (STP) is widely used on a data forwarding layer of the Ethernet. As a network protection technology, the STP is used to generate a tree, to prevent a network loopback on a local area network, and resolve a “broadcast storm” problem on an Ethernet network on which a loop occurs. The STP is a data-link-layer (layer 2) communications protocol that is based on an open system interconnection reference model (OSI). However, because the STP blocks some ports to prevent a loop, that is, does not allow multipath routing, all data packets are transmitted in one tree (that is, the data packets are transmitted along a non-optimal path), and even if there is an idle link, the idle link cannot be used. Consequently, bandwidth cannot be fully utilized.
To eliminate the defect of the STP, the Internet Engineering Task Force (IETF) puts forward the Transparent Interconnection of Lots of Links (TRILL) protocol. In the TRILL protocol, the Intermediate System to Intermediate System Routing Protocol (IS-IS) of layer 3 is introduced in layer 2 to replace the STP, to allow multipath routing and allow data packet transmission along a shortest path such that bandwidth can be utilized more fully. A device running the TRILL protocol is referred to as a TRILL switch or routing bridge. In the TRILL protocol, fields such as an identifier (nickname), a virtual local area network (VLAN), and a Media Access Control (MAC) address are encapsulated in a data packet. The nickname is a device identifier of a TRILL switch, and the MAC address is a device identifier of a source device or a target device. To resolve a scalability problem of a TRILL network, the TRILL network is divided into multiple areas. The areas are connected to and communicate with each other using border routing bridge devices. That is, all routing bridges inside one area form a level 1 (L1) network, and the areas are interconnected to form a level 2 (L2) network.
In an existing multi-level TRILL network solution, for an L1 area, an aggregate nickname is used to represent an L1 area (pseudonode), and the pseudonode is regarded as a routing bridge on an L2 network. FIG. 1A is a schematic diagram of a multilevel TRILL network on which an aggregate nickname is used. FIG. 1B is a topological diagram of the network shown in FIG. 1A on an L2 network. As shown in FIG. 1A, an aggregate nickname 15961 is used to represent a left area, and an aggregate nickname 15918 is used to represent a right area. A network topology of the network shown in FIG. 1A on the L2 network is shown in FIG. 1B. RB1 and RB4 shown in FIG. 1A are routing bridge devices on the L1 network. As shown in FIG. 1A and FIG. 1B, RBb, RBc, RBd, RBe, RBf, RBg, RBh, RBi, and RBj are routing bridge devices on the L2 network. BRB2 and BRB20 are border routing bridge devices in the left area, and BRB3 and BRB30 are border routing bridge devices in the right area. BRB2, BRB20, BRB3, and BRB30 belong to both the L1 network and the L2 network. When a source device S sends a data packet to a target device D and the data packet passes through BRB2, BRB2 changes a source nickname of the data packet from a nickname 27 of RB1 to the aggregate nickname 15961 of the left area. After receiving the data packet whose source nickname has been changed, RB4 learns that the source device S can be reached using routing bridge 15961. Further, when any data packet needs to return to routing bridge 15961 from routing bridge 15918 (data packet from a nickname 44 of RB4), it is always determined, according to a shortest path algorithm defined in the TRILL, to forward the data packet using BRB2. Consequently, a load imbalance is caused.